package main

import "fmt"

/*
* Author: JacksonCoder
* CreateTime: 2025/5/19
 */

func modify(p *int) {
	fmt.Println(p) // address
	*p = 10000900  // value
	return
}

func main() {

	var a int = 10
	fmt.Println(&a)

	var p *int
	p = &a

	fmt.Println("the address of p: ", &p)
	fmt.Println("the value of p: ", p)
	fmt.Println("the value of p point to variable: ", *p)

	fmt.Println(*p)
	*p = 100
	fmt.Println(a)

	var b int = 999
	p = &b
	*p = 5

	fmt.Println(a) // 100
	fmt.Println(b) // 5

	modify(&a)     //
	fmt.Println(a) //  10000900

}
